//
//  OTGroupView.m
//  OT_OC
//
//  Created by yunmian on 2019/7/15.
//  Copyright © 2019 James. All rights reserved.
//

#import "OTGroupView.h"

@interface OTGroupView ()
{
    UILabel             *titleLabel;
}
@end

@implementation OTGroupView

- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        [self initUI];
    }
    return self;
}

- (void)initUI {
    
    self.backgroundColor = UIColor.yellowColor;
    titleLabel = [[UILabel alloc] init];
    [self addSubview:titleLabel];
}

- (void)layoutSubviews {
    
    [super layoutSubviews];
    
    [titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.equalTo(self);
        make.left.offset(10);
    }];
}

#pragma mark Set
- (void)setTitle:(NSString *)title {
    _title = title;
    titleLabel.text = title;
}
@end
